package structural.adapter.object;

/**
 * @ClassName: MainTest
 * @Description: 测试类
 * @Author: liu-hao
 * @Date: 2023-04-11 11:39
 * @Version: 1.0
 **/
public class MainTest {
    public static void main(String[] args) {
        SDCard sanDiskSD = new SanDiskSD("闪迪SD卡...");
        TFCard sanDiskTF = new SanDiskTF("闪迪TF卡...");

        Computer computer = new Computer();
        computer.readSD(sanDiskSD);

        System.out.println("===============================");

        // 使用适配器读取sanDiskTF内容
        computer.readSD(new SDAdapterTF(sanDiskTF));
        computer.writeSD(new SDAdapterTF(sanDiskTF), "modify data");


    }
}
